<template>
	<view class="page">
		<navigator :url="'../writing/detail?historyId='+item.historyId" class="history_list" v-for="(item,index) in aiuseHistoryListVoList" :key="index">
			<view class="title">
				{{item.content}}
			</view>
			<view class="date">
				{{item.createTime}}
			</view>
		</navigator>
	</view>

</template>

<script>
	export default {
		data() {
			return {
				inputText: '',
				maxChars: 500,
				aiuseId:'',
				aiuseHistoryListVoList:[]
			}
		},
		
		onLoad(options) {
			this.aiuseId = options.aiuseId;
			this.getApplicationDetail();
		},
		methods: {
			/*获取数据*/
			getApplicationDetail() {
				let self = this;
				let appId = this.getAppId();
				self._get('plus/aiuse/aiuse/detail',  {
					appId: appId,
					aiuseId: this.aiuseId
				}, function(res) {
					self.aiuseHistoryListVoList = res.data.aiuseHistoryListVoList;
					if(self.aiuseHistoryListVoList && self.aiuseHistoryListVoList.length > 0){
						for(var i=0;i<self.aiuseHistoryListVoList.length;i++){
							uni.setStorageSync(appId + '_aiuseHistory_' + self.aiuseHistoryListVoList[i].historyId,self.aiuseHistoryListVoList[i]);
						}
					}
				});
			}
		}
	}
</script>
<style>
	page {
		background: #F6F6F6;
	}
</style>
<style lang='css' scoped>
	.history_list{
		margin: 30rpx 20rpx;
		padding: 46rpx 37rpx;
		background: #FFFFFF;
		border-radius: 20rpx;
		.title{
			font-weight: 500;
			font-size: 36rpx;
			color: #333333;
			margin-bottom: 36rpx;
		}
		.date{
			font-weight: 300;
			font-size: 24rpx;
			color: #999999;
		}
	}
</style>